<!doctype html>
<html  class="x-admin-sm">
<head>
	<meta charset="UTF-8">
	<title>教师综合评教系统</title>
	<meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" href="/static/css/font.css">
    <link rel="stylesheet" href="/static/css/login.css">
    <link rel="stylesheet" href="/static/css/xadmin.css">
    <script type="text/javascript" src="/static/js/jquery.min.js"></script>
    <script src="/static/lib/layui/layui.js" charset="utf-8"></script>
    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body class="login-bg">
    
    <div class="login layui-anim layui-anim-up">
        <div class="message">教师综合评教系统</div>
        <div id="darkbannerwrap"></div>
        
        <form method="post" class="layui-form">
            <input name="username" placeholder="用户名"  type="text" lay-verify="required" class="layui-input" id="username">
            <hr class="hr15">
            <input name="password" lay-verify="required" placeholder="密码"  type="password" class="layui-input" id="password">
            <hr class="hr15">
            <input value="登录" lay-submit lay-filter="login" style="width:100%;" type="button" id="btn_login">
            <hr class="hr20" >
        </form>
    </div>

    <script>
        $(function  () {
            $('#btn_login').click(function () {
             $.ajax({
                type:'POST',  //提交方法是POST
                url:'/loginCheck', //请求的路径
                data:{user_account:$("#username").val(),password:$("#password").val()}, //以JSON字符串形式把 user 传到后台
                dataType:"json", //后台返回的数据类型是html文本
                timeout:0,  //请求超时时间，毫秒
                success:function(res){   //请求成功的回调方法
                    console.log(res);
                    if(res.msg===1){
                        window.location.href="/index";
                    }
                }
             });
            });
        })
    </script>


</body>
</html>